home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbwinfnt.zip
/
EX_DSTRG.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-03-01
|
1KB
|
33 lines
REM: EX_DSTRG.BAS, Unregistered Version 1.0
REM: Example of using DispString to display text.
DECLARE SUB DispString (Text$, FClr%, BClr%, X%, Y%, FontArray%())
DECLARE SUB LoadRsrcFileFont (FlName$, FontNum%, FontArray%(), RetCode%, RetMsg$)
'...setup a VGA screen mode...
SCREEN 12
'...dim array for font data (use REDIM so its DYNAMIC)...
REDIM FontArray%(1)
PRINT : PRINT "Loading a font from SAMPLE.FON..."
'...load the font in the example FON file...
CALL LoadRsrcFileFont("SAMPLE.FON", 1, FontArray%(), RetCode%, RetMsg$)
'...check the return code...
IF (RetCode% <> 0) THEN STOP
'...display string in foreground and background color...
CALL DispString(" Foreground & Background ", 4, 7, 100, 100, FontArray%())
'...text foreground only, negative color forces no background...
CALL DispString(" Foreground Only ", 4, -1, 100, 135, FontArray%())
'...text background only, negative color forces no foreground...
CALL DispString(" Background Only ", -1, 7, 100, 170, FontArray%())
END